package com.ardf.mapper;

import com.ardf.entity.Athlete;
import com.ardf.entity.Project;
import com.ardf.entity.dto.AthleteSearchAllDto;
import com.ardf.entity.dto.ReplaceCardTableDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ShiYunHao
 * @since 2025-01-06
 */
public interface AthleteMapper extends BaseMapper<Athlete> {
    /**
     *有条件分页
     */
    Page<AthleteSearchAllDto> searchAll(Page<AthleteSearchAllDto> page,@Param("competitionId") Long competitionId,
                                        @Param("searchAll") String searchAll);



    /**
     * 根据项目id搜索
     */
    Page<AthleteSearchAllDto> searchAllByProjectId(Page<AthleteSearchAllDto> page,
                                                   @Param("projectId") Long projectId);

    List<ReplaceCardTableDto> selectAllAthleteByComId(@Param("competitionId") Long competitionId);

}
